﻿using System.Collections.Generic;
using JetBrains.Annotations;

namespace MugenMvvmToolkit.Interfaces
{
    /// <summary>
    ///     Represents a container for the results of a validation request.
    /// </summary>
    public interface IValidationResult
    {
        /// <summary>
        ///     Gets the value which contains validation result.
        /// </summary>
        bool IsValid { get; }

        /// <summary>
        ///     Gets the collection of member names that indicate which fields have validation errors.
        /// </summary>
        /// <returns>
        ///     The collection of member names that indicate which fields have validation errors.
        /// </returns>
        [NotNull]
        IEnumerable<string> MemberNames { get; }

        /// <summary>
        ///     Gets the error message for the validation.
        /// </summary>
        /// <returns>
        ///     The error message for the validation.
        /// </returns>
        string ErrorMessage { get; set; }
    }
}